Blending text and graphics for display

ABSTRACT

Text and graphics elements may be alpha blended in a way to reduce flicker when the text or graphics are display by a processor-based television receiver. The alpha values are used to intelligently smooth pixels adjacent the element to create television text and graphics.

BACKGROUND

The present invention relates generally to techniques for displayingcomputer information on televisions.

In a number of applications, users may wish to display computerinformation on a conventional television receiver. Using a televisionreceiver (which the user may already have) instead of a computer monitormay result in cost savings. In addition, some users may wish to have acomputer system which doubles as a television receiver. Thus, the usermay watch conventional television programs using a tuner card in thecomputer system to tune to the desired programs. In devices known as settop computers, a computer system may be mounted atop a conventionaltelevision to implement combined television receiving and conventionalcomputer functions. For example, such systems advantageously implementelectronic programming guides for computer control of television programaccess.

Interlacing contributes to the inferior quality of images developed bycomputer systems that are displayed on television monitors. Interlacingis a technique by which a complete television picture is developed intwo passes from top to bottom on the television screen. Withinterlacing, the first pass paints all the “odd” lines and the secondpass paints the “even” lines.

Flicker may occur when the images in the odd lines are very differentfrom the images in the even lines. As the odd and even lines arealternately displayed, the eye may perceive the quick appearing anddisappearing of visual information. Flicker is especially noticeablewhen viewing thin horizontal lines that only take up a single odd oreven row. The same objectionable phenomenon occurs at the horizontalboundaries of text.

A flicker filter may be used to reduce such flickering. A flicker filteris generally a 3 or 5 tap finite impulse response (FIR) filter. An N-tapfilter uses N multiplications and N-1 additions per color component ofeach output pixel. An equation representing the calculation implementedby a 3-tap filter is as follows:Pout=T1*P1+T2*P2+T3*P3T1, T2 and T3 are the tap values and P1, P2 and P3 are the values ofadjacent pixels. Thus, flicker filters are quite computationallyintensive.

Some flicker filters work by altering the information in the odd andeven lines of a television picture so that the alternating lines aremore similar to each other. In this way, when the lines appear anddisappear in the interlacing process, the flicker is less noticeable.The more similar the lines are made to appear, the less flicker isvisible. Other flicker filters reduce flicker by completely discardingevery other line of the image, and displaying two successive passes ofthe remaining lines. Because the interlaced lines are now identical,flicker is less visible. In either case, vertical resolution issacrificed. The obvious trade-off is that as flicker is reduced, moreand more information is altered or lost from the original picture. Thin,horizontal lines may disappear. Small text may become unreadable.

The quality of flicker filters may vary based on design and cost. Lowend flicker filters apply their techniques to the entire screenindiscriminately or blindly. These types of flicker filters may causeundesirable results, when only a small portion of the screen needsfiltering, by adversely altering regions that were unnecessarilyfiltered.

Thus, there is a continuing need for ways to economically improve thedisplay of information from processor-based systems on televisions.

SUMMARY

In accordance with one aspect, a method includes acquiring a graphicsprimitive to be displayed on a television receiver. The transparency ofportions of the primitive are selectively adjusted relative to abackground to reduce flicker when the primitive is displayed on atelevision receiver.

Other aspects are set forth in the accompanying detailed description andclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a computer system according to a preferredembodiment;

FIG. 2 is a block diagram of a software display driver architectureaccording to the preferred embodiment;

FIG. 3 is a pixel block diagram of a character rendered according to thepreferred embodiment; and

FIG. 4 is a flow chart for software for implementing one embodiment ofthe present invention.

DETAILED DESCRIPTION

Referring to FIG. 1, a processor-based system 10 may use a televisionreceiver 18 to display information. Although the system 10 isillustrated as a personal computer, the present invention may also beimplemented on other computer platforms or architectures, such asset-top boxes, processor-based appliances, video game players, anddigital video disk (“DVD”) players.

A processor 11 is coupled to a host bridge hub 12, such as an Intel®82810 graphics and memory controller hub, in one embodiment of theinvention. The host bridge hub 12 may include a memory controller foraccessing a main memory 14 (e.g. synchronous dynamic random accessmemory (“SDRAM”)), and graphics controller 13 with motion compensationvideo capabilities. The graphics controller 13 may also include adigital video output port which couples (via an external video encoder16) to the analog television receiver 18.

As will be explained below, font and graphics libraries may be used inone embodiment of the invention for rendering fonts and lines in amanner that flicker is reduced. In some embodiments flicker may bereduced with less processing than conventional flicker filters.

The host bridge hub 12 may also couple an input/output (“I/O”)controller hub 20, such as an Intel® 82801 I/O hub in one embodiment ofthe invention. The I/O controller hub 20 may be an integratedmultifunctional I/O controller hub that provides the interface to a bus22, a multifunction I/O controller 24, and a firmware hub 26 and mayintegrate other functions, such as an enhanced direct memory access(“DMA”) controller, an interrupt controller, a timer, an integrateddrive electronics (“IDE”) controller for providing IDE ports, and auniversal serial bus (“USB”) host controller, as examples. Four IDEdevices, such as a hard disk drive 28, a compact disk read only memory(“CD-ROM”) drive 30, and a DVD drive 32 may be coupled to the hub 20. Atelevision tuner/capture card 49 may also be coupled to the hub 20.

The I/O controller hub 20 may support two codecs such as the audio codec36 and modem codec 38. The audio codec 36 may be coupled to a speaker 40and the modem codec 38 may be coupled to a network 41, such as atelecommunications, satellite or cable network.

The multifunction I/O controller 24 typically includes a number offunctions, such as a floppy disk drive controller for coupling a floppydisk drive 42, a keyboard controller for connecting to a keyboard 44 anda pointing device 46, a serial communications controller for providingat least one serial port 48, and a parallel port interface for providingat least one parallel port 50. In one embodiment of the invention, thekeyboard 44 and pointing device 46 are coupled via an infraredtransmitter/receiver 52 for wireless communications.

Referring to FIG. 2, a display driver architecture 70 according to oneembodiment of the present invention, may include font library 72 andgraphics library 74 for displaying lines and text on the receiver 18.The resulting fonts and graphics are prepared for display on thereceiver 18 by the display driver architecture 70.

More specifically, in a display driver architecture 70, in accordancewith one embodiment of the invention, a display driver 76 is a dynamiclink library (“DLL”) that translates device-independent commands from agraphics device interface (“GDI”) 78 into commands and actions that thegraphics controller 13 may use to draw graphics on the receiver 18. GDIcommands may include as examples, bitmap operations, managing graphicsobjects, managing color palettes, and drawing lines, curves, filledshapes, and text. The device independent commands originate from asoftware application, such as a drawing program, slide show program,movie program, game program or other application. The display driver 76may also supply information to the operating system regarding thedisplay hardware (e.g. receiver 18), such as color resolution, graphicscapabilities, screen size and resolution, and other display features.The fonts and graphics are rendered into a frame buffer 80.

To take advantage of special features of the graphics controller 13, adisplay minidriver may be provided in one embodiment of the invention.To take advantage of the font and graphics libraries, the display driver76 may contain program code to render font and graphics elementsaccording to special alpha blending values embedded with font andgraphic elements. The graphics elements may include text, characters,lines, shapes and other graphics primitives. Alpha blending usespre-defined values, called alpha values, to control the way graphicsinformation is displayed, such as the level of transparency or opacityof graphics primitives. Thus, pixel colors may be blended in varyingproportion with the color of the primitive being drawn. The proportionis the transparency or alpha value.

Instead of using the alpha values to create visual effects, the alphavalues may be assigned to overcome flickering. That is, by smoothing theedges of horizontal features, the amount of flickering which results maybe reduced. Thus, by assigning alpha values which cause backgroundcolors to blend with graphics primitives along horizontal lines, theflickering which results from display on analog television receivers maybe decreased without the need for computationally complex FIR filtering.

By focusing on the horizontal components which cause filtering, verticalcomponents of graphics primitives need not be affected. Thus, comparedto other filtering techniques which are applied indiscriminately to allof the features on the display, the use of alpha blending techniques maybe adapted, in some embodiments of the invention, to only adjust thedisplay of horizontal features.

Referring now to FIG. 3, a letter “T” is prepared according to oneembodiment of the present invention. A bitmap may be produced by thedisplay driver 76 according to the font and graphics libraries 72 and 74and input signals from an application. A normally rendered “T” is shownin solid black in FIG. 3. The enhancements shown around the “T” are theresult of an “alpha blending” method according to alpha values embeddedwith font and graphic primitives.

A font and graphics primitive may have at least one associated alphavalue. The alpha value instructs the display driver 76 how to smooth(i.e. how much transparency to implement for) the graphics primitive toreduce flicker. Progressive smoothing may be applied in one or many morestages. For example, the letter “T” may have two alpha values applied inone embodiment of the invention. A first value (0.5) in a first stage isapplied to pixels adjacent (once removed) the horizontal sections of the“T” and a second value (0.25) is applied in a second stage to pixelstwice removed from the horizontal sections.

The alpha (α) blended pixels may take into account the color of thebackground (P_(overlay)) and foreground (font or graphics) (P_(in)) tosmooth out horizontal primitive edges between the overlay or backgroundand the primitive:P_(out) 32 α*P_(overlay)+(1−α)* P_(in)or this may reduce toP_(out)=α(P_(overlay)−P_(in))+P_(in)

Referring next to FIG. 4, software 82 for implementing the alphablending in the graphics controller 13 may be stored on the hard drive28, in accordance with an embodiment of the present invention. The flowbegins by determining whether a primitive has been requested for displayas indicated in diamond 84. If so, the primitive may be acquired fromthe libraries 72 or 74 as the case may be, as indicated in block 86. Thecolor value for the background is then acquired as indicated in block88. Similarly, the color value for the primitive is acquired asindicated in block 90. The alpha blending equation, set forth above, isthen used to calculate a new color value or grey scale value, asindicated in block 92.

The pixels of a video display include three color components such asred, green and blue in an RGB tricolor space. The color values of thethree color components are added together to produce a displayed colorhaving a color value.

Using the hypothetical example illustrated in FIG. 3, the color valuesfor pixels P_(2,9) and P_(2,10) can be calculated. Pixel P_(2,9) has aalpha value of 0.5 applied and pixel P_(2,10) has an alpha value of0.25. These alpha values may be associated with the primitive “T” in thefont library. For example, the primitive and its alpha values may bestored together as a file.

Assuming a black letter (P_(in)=1 in grey scale) on a white background(P_(overlay)=0 in grey scale), P_(2,9)=0.5*0+0.5* 1. Broken down intoits color components P_(out) yields:P_(RED)=0.5*0h+0.5*FFh=7FhP_(GREEN)=0.5*0h+0.5*FFh=7FhP_(BLUE)=0.5*0h+0.5*FFh=7FhTaken together the color components yield a relatively dark grey scalepixel next to the black pixel P_(2,8).

For pixel P_(2,10) the color components are:P_(RED)=0.25*0h+0.75*FFh=BDhP_(GREEN)=0.25*0h+0.75*FFh=BDhP_(BLUE)=0.25*0h+0.75*FFh=BDhTaken together the color components yield a lighter grey scale pixel.

Thus, in the example, the black character overlaid on a white backgroundwas smoothed with darker gray scale and lighter gray scale blending onthe horizontal edges. This blending at horizontal edges reduces theflickering that results from the use the television receiver 18 as adisplay.

The smoothing can be distributed over a number of pixels outwardly fromthe horizontal edge by varying the number of alpha blending stages. Forexample, a value of 0.5 may be used for a single pixel row of smoothingwhile values of 0.75, 0.5 and 0.25 may be used for three pixel rows ofsmoothing. Additionally, since the alpha values may be stored as part offont or graphics primitives, individual elements may differ in thenumber of stages and the alpha values in each stage that are desirablefor adequate smoothing. For example, as a hypothetical example, theletter “T” may smooth better with 0.5 and 0.25 alpha values and theletter “R” may smooth best with a single alpha value of 0.4. Graphicsprimitives, such as horizontal lines may have yet another set of alphavalues.

Because the alpha blending may be selectively applied to the horizontalportions of text and graphics in one embodiment of the invention, theflicker filtering of the overall display may be reduced as compared tothe use of the prior N-tap flicker filters alone. Moreover, on a pixelto pixel comparison, the use of alpha blending may involve lessmathematical processing than the N-tap method. Comparatively, per outputpixel color component, a 3-tap filter uses 3 multiplications and 2additions versus the alpha blending method described above on the “T”which may use one multiplication, one addition and one subtractoperation. Therefore, embodiments using alpha blending may provide amore intelligent flicker reduction technique.

In some embodiments alpha blending may be used together with flickerfilters, for example using N-tap flicker filters. In some embodiments,less computationally complex FIR filters may be used because of the useof alpha blending. In other embodiments, flicker filters may beeliminated.

While the present invention has been described with respect to a limitednumber of embodiments, those skilled in the art will appreciate numerousmodifications and variations therefrom. It is intended that the appendedclaims cover all such modifications and variations as fall within thetrue spirit and scope of this present invention.

1. A method comprising: acquiring a graphics primitive to be displayedon a television receiver; and selectively adjusting the transparency ofportions of the primitive relative to a background to reduce flickerwhen the primitive is displayed on a television receiver by smoothingthe horizontal edges of the primitive based on the color of theprimitive and the color of the background.
 2. The method of claim 1including acquiring the primitive from a library.
 3. The method of claim1 including forming a bit map of the primitive for overlaying on saidbackground.
 4. The method of claim 1 wherein selectively adjustinginvolves adjusting only a horizontal portion of said primitive.
 5. Themethod of claim 4 further including selecting at least two alpha valuesfor a horizontal portion of said primitive and adjusting the depictionof said primitive in two stages.
 6. The method of claim 5, whereinselectively adjusting includes modifying at least one row of pixelsadjacent horizontal portions of the element.
 7. The method of claim 1wherein selectively adjusting includes using alpha blending.
 8. Themethod of claim 7, wherein selectively adjusting includes subtractingthe color value of the primitive from the color value of the backgroundcolor and multiplying the difference by an alpha value.
 9. An articlecomprising a medium for storing instructions that enable aprocessor-based system to: acquire a graphics primitive to be displayedon a television receiver; and selectively adjust the transparency of theprimitive relative to a background to reduce flicker when said primitiveis displayed on a television receiver by smoothing the horizontal edgesof the primitive based on the color of the primitive and the color ofthe background.
 10. The article of claim 9 further storing instructionsthat cause a processor-based system to multiply an alpha value times thedifference of a color value for the background color and the color valuefor the graphical primitive and to add the color value of the primitive.11. The article of claim 10 further storing instructions that cause aprocessor-based system to acquire a font and an alpha value from adatabase.
 12. The article of claim 9 further storing instructions thatcause a processor-based system to alpha blend the horizontal edges of agraphical primitive.
 13. The article of claim 12 further storinginstructions that cause a processor-based system to alpha blend theedges of a graphical primitive in at least two stages.
 14. An apparatusto reduce flicker comprising: a processor; and a storage coupled to saidprocessor, said storage storing instructions to enable a graphicsprimitive to be acquired for display on a television receiver and toselectively adjust the transparency of the primitive relative to thebackground to reduce flicker by smoothing the horizontal edges of theprimitive based on the color of the primitive and the color of thebackground.
 15. The apparatus of claim 14 including a tuner card coupledto said processor.
 16. The apparatus of claim 15 including a televisionreceiver coupled to said processor.
 17. The apparatus of claim 16wherein said storage includes a font database associated with alphavalues that reduce flicker.
 18. The apparatus of claim 17 wherein saidstorage includes instructions to cause an alpha value to be multipliedby the difference of the color values of a background and primitive andto add the color value of the primitive.
 19. A method comprising:acquiring a graphics primitive to be displayed; and selectivelyadjusting the transparency of portions of the primitive relative to abackground to reduce flicker when the primitive is displayed bysmoothing horizontal edges of the primitive based on the color of theelement and the color of the background.
 20. The method of claim 19including acquiring the primitive from a library.
 21. The method ofclaim 19 including forming a bit map of the primitive for overlaying onsaid background.
 22. The method of claim 19 wherein selectivelyadjusting involves adjusting only a horizontal portion of saidprimitive.
 23. The method of claim 22 further including selecting atleast two alpha values for a horizontal portion of said primitive andadjusting the depiction of said primitive in two stages.
 24. The methodof claim 23, wherein selectively adjusting includes modifying at leaston row of pixels adjacent horizontal portions of the element.
 25. Themethod of claim 19 wherein selectively adjusting includes using alphablending.
 26. The method of claim 25, wherein selectively adjustingincludes subtracting the color value of the primitive from the colorvalue of the background color and multiplying the difference by an alphavalue.
 27. An article comprising a medium for storing instructions thatcause a processor-based system to: acquire a graphics primitive to bedisplayed; and selectively adjust the transparency of the primitiverelative to background to reduce flicker when said primitive isdisplayed by smoothing horizontal edges of the primitive based on thecolor of the element and the color of the background.
 28. The article ofclaim 27 further storing instructions that cause a processor-basedsystem to multiply an alpha value times the difference of a color valuefor the background color and the color value for the graphical primitiveand to add to the color value of the primitive.
 29. The article of claim28 further storing instructions that cause a processor-based system toacquire a font and an alpha value from a database.
 30. The article ofclaim 27 further storing instructions that cause a processor-basedsystem to acquire a font and an alpha value from a database.
 31. Thearticle of claim 27 further storing instructions that cause aprocessor-based system to alpha blend the edges of a graphical primitivein at least two stages.
 32. An apparatus to reduce flicker compromising:a processor; a storage coupled to said processor, said storage storinginstructions to cause a graphics primitive to be acquired for displayand to selectively adjust the transparency of the primitive relative toa background to reduce flicker by smoothing horizontal edges of theprimitive based on the color of the element and the color of thebackground.
 33. The apparatus of claim 32 including a tuner card coupledto said processor.
 34. The apparatus of claim 33 including a televisionreceiver coupled to said tuner card.
 35. The apparatus of claim 34wherein said storage includes a font database associated with alphavalues that reduce flicker.
 36. The apparatus of claim 35 wherein saidstorage includes instructions to cause an alpha value to be multipliedby the difference of the color values of a background and primitive andto add to the color value of the primitive.